using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web.UI.WebControls;
using System.Xml.Linq;
using System.Web.UI;

public class CommonManager
{
    public CommonManager()
	{
	}

    public static  void showAlartMessage(string message,System.Web.UI.Page page)
    {
        ScriptManager.RegisterStartupScript(page, page.GetType(),
             "err_msg",
             "alert('" + message + "');",
             true);
    }

    public static DataSet SQLExec(string sql)
    {
        DataSet sql_CommonDS = new DataSet();
        SQL_Common sql_Common = new SQL_Common();
        sql_CommonDS = sql_Common.COMN_ExecSQL(sql);
        return sql_CommonDS;
    }

    //41532
    public static string PriceEnCodeing(string rowPrice)
    {
        return decimal.Parse(rowPrice).ToString("00000").Substring(3, 1)
            + decimal.Parse(rowPrice).ToString("00000").Substring(0, 1)
            + decimal.Parse(rowPrice).ToString("00000").Substring(4, 1)
            + decimal.Parse(rowPrice).ToString("00000").Substring(2, 1)
            + decimal.Parse(rowPrice).ToString("00000").Substring(1, 1)
            ;

    }

    public static string PriceDeCodeing(string rowPrice)
    {
        return decimal.Parse(rowPrice).ToString("00000").Substring(1, 1)
            + decimal.Parse(rowPrice).ToString("00000").Substring(4, 1)
            + decimal.Parse(rowPrice).ToString("00000").Substring(3, 1)
            + decimal.Parse(rowPrice).ToString("00000").Substring(0, 1)
            + decimal.Parse(rowPrice).ToString("00000").Substring(2, 1)
            ;

    }
}

